package ressource;

import java.sql.Date;

public class CadreVente {

	private Integer idVente;
	private Integer idAcheteur;
	private Integer idAnnonce;
	private Integer stock;
	private Float note;
	private Date date;
	private Integer prix;
	private String commentaire;
	/**
	 * @return the id_vente
	 */
	public Integer getIdVente() {
		return idVente;
	}
	/**
	 * @param id_vente the id_vente to set
	 */
	public void setIdVente(Integer id_vente) {
		this.idVente = id_vente;
	}
	/**
	 * @return the id_acheteur
	 */
	public Integer getIdAcheteur() {
		return idAcheteur;
	}
	/**
	 * @param id_acheteur the id_acheteur to set
	 */
	public void setIdAcheteur(Integer idAcheteur) {
		this.idAcheteur = idAcheteur;
	}
	/**
	 * @return the id_annonce
	 */
	public Integer getIdAnnonce() {
		return idAnnonce;
	}
	/**
	 * @param id_annonce the id_annonce to set
	 */
	public void setIdAnnonce(Integer id_annonce) {
		this.idAnnonce = id_annonce;
	}
	/**
	 * @return the stock
	 */
	public Integer getStock() {
		return stock;
	}
	/**
	 * @param stock the stock to set
	 */
	public void setStock(Integer stock) {
		this.stock = stock;
	}
	/**
	 * @return the note
	 */
	public Float getNote() {
		return note;
	}
	/**
	 * @param note the note to set
	 */
	public void setNote(Float note) {
		this.note = note;
	}
	/**
	 * @return the date
	 */
	public String getDate() {
		if(date == null) return null;
		else{
			String[] buffer = date.toString().split("[- :]");
			return buffer[2] + "/" + buffer[1] + "/" + buffer[0];
		}
	}
	/**
	 * @param date the date to set
	 */
	public void setDate(Date date) {
		this.date = date;
	}
	/**
	 * @return the prix
	 */
	public Integer getPrix() {
		return prix;
	}
	/**
	 * @param prix the prix to set
	 */
	public void setPrix(Integer prix) {
		this.prix = prix;
	}
	/**
	 * @return the commentaire
	 */
	public String getCommentaire() {
		return commentaire;
	}
	/**
	 * @param commentaire the commentaire to set
	 */
	public void setCommentaire(String commentaire) {
		this.commentaire = commentaire;
	}
}
